Skip to content

docs: convert remaining code examples from CommonJS to ESM - #3051

Open
Agi-Asi wants to merge 1 commit into
slackapi:mainfrom
Agi-Asi:docs/esm-examples
Open

docs: convert remaining code examples from CommonJS to ESM#3051
Agi-Asi wants to merge 1 commit into
slackapi:mainfrom
Agi-Asi:docs/esm-examples

Conversation

@Agi-Asi

@Agi-Asi Agi-Asi commented Aug 27, 2026

Copy link
Copy Markdown

Summary

Fixes #2923. Converts the remaining CommonJS code examples to ESM, covering exactly the in-scope checklist from that issue — 11 English pages (concepts: authenticating-oauth, custom-routes, deferring-initialization, error-handling, logging, message-listening, receiver, socket-mode, token-rotation; deployments: aws-lambda; tutorials: code-assistant) and 8 Japanese counterparts.

Conversions applied:

  • const { X } = require('pkg')import { X } from 'pkg'
  • const X = require('pkg')import X from 'pkg'
  • module.exports.handler = async (…)export const handler = async (…) (AWS Lambda deployment docs, both languages — the case specifically called out in the issue notes)

The deprecated legacy/steps-from-apps.md pages are untouched, per the issue's "Out of scope" section. No prose changes — code fences only.

Verified: zero require(/module.exports remaining across the in-scope files, and npm run lint (biome checks docs/) passes.

Requirements

The quickstart guides and README already use ESM imports; the concept,
deployment, and tutorial pages listed in slackapi#2923 still used require()
and module.exports. Convert exactly the in-scope files from that
issue's checklist (11 English + 8 Japanese):

- const { X } = require('pkg')  ->  import { X } from 'pkg'
- const X = require('pkg')      ->  import X from 'pkg'
- module.exports.handler = ...  ->  export const handler = ...
  (AWS Lambda deployment docs, both languages)

The legacy steps-from-apps pages stay untouched, as called out
under 'Out of scope' in the issue.

npm run lint (biome covers docs/) passes.

Fixes slackapi#2923
@Agi-Asi
Agi-Asi requested a review from a team as a code owner August 27, 2026 12:48
@salesforce-cla

Copy link
Copy Markdown

Thanks for the contribution! Before we can merge this, we need @Agi-Asi to sign the Salesforce Inc. Contributor License Agreement.

@changeset-bot

changeset-bot Bot commented Aug 27, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 0670537

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Agi-Asi Agi-Asi closed this Aug 27, 2026
@Agi-Asi Agi-Asi reopened this Aug 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: convert remaining code examples from CommonJS to ESM

1 participant